package com.jd.oneday.month4;

/**
 * 拆分字符串问题
 * 要求如下：
 * 1. 不能使用int 转 字符串的函数
 */
public class Day_18 {


    public static void main(String[] args) {

        int a = 1234;

        StringBuilder builder = new StringBuilder();

        int i = 0;
        while (a!=0){
            int b = a % 10;
            builder.append(b);
            a = a /10;
            i++;
        }

        String str = builder.toString();

        String[] result = new String[str.length()];

        for (int j = 0;j<str.length();j++) {
            char c = str.charAt(str.length() - j-1);
            result[j] = c+"";
        }
    }

}
